#ifndef CAMERA_H
#define CAMERA_H

#include <vector>
#include <SFML/Graphics.hpp>
#include "World.h"
#include "Entity.h"
#include "Vectors.h"

namespace me
{

	class Camera
	{
		public:
			Camera(me::Vector2f worldPos = me::Vector2f(0.0f, 0.0f));
			virtual ~Camera();

			me::Vector2f getWorldPos();
			me::Entity* getLockedEntity();
			me::Vector2f getLockedOffset();

			void setWorldPos(me::Vector2f pos);
			void moveWorldPos(me::Vector2f movement);
			void centerOn(sf::RenderWindow* window, me::World* world, me::Vector2f pos);
			void lockOn(me::Entity* entity, me::Vector2f offset = me::Vector2f(0.0f, 0.0f));
			void unlock();
			void setLockedOffset(me::Vector2f offset);

			void draw(sf::RenderWindow* window, me::World* world);
		protected:
			me::Vector2f m_worldPos;
			me::Entity* m_lockedEntity;
			me::Vector2f m_lockedOffset;
		private:
	};

}

#endif // CAMERA_H
